package day1214;

import java.util.Scanner;

public class T10 {
    public static void main(String[] args) {

        Scanner s=new Scanner(System.in);
        System.out.println("请输入一个整数n表示： 要计算数列前n项的和");
        int n=s.nextInt();

        double sum=0;
        for (double i = 1; i <= n; i++) {
            sum= sum +  i / (i+1) ;
        }


    }
}
